package main

import (
	"fmt"
	"log"
	"net"
	"os"
	"time"
)

func client(host, port string) {
	conn, err := net.Dial("tcp4", host+":"+port)
	if err != nil {
		log.Println(err.Error())
		os.Exit(0)
	}
	defer conn.Close()

	b := make([]byte, 100000, 100000)

	conn.Write(b)

	for i := 0; ; i++ {
		time.Sleep(time.Millisecond * 100)
		n, err := conn.Write(b)
		if err != nil {
			fmt.Println("Err: ", n, err.Error())
		}
		fmt.Print(".")
		if i%1000 == 0 {
			fmt.Println()
		}
	}

}
